﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using NJamb.Specifications.Simple.Singular;
using Stile.Patterns.SelfDescribingPredicates;
#endregion

namespace NJamb.Parser.SpecificationBuilders.SubjectIs.Simple.Singular
{
    public class NegatableSingularIs<TSubject> : FluentIs<TSubject, ISingularSpecification<TSubject>, ISingularIs<TSubject>>,
        INegatableSingularIs<TSubject>,
        ISingularIs<TSubject>
    {
        public NegatableSingularIs(
            ICollaboratingSpecificationBuilder<TSubject, ISingularSpecification<TSubject>> specificationBuilder, Negated negated)
            : base(specificationBuilder, negated) {}

        protected override ISingularIs<TSubject> FactoryForNegation(
            ICollaboratingSpecificationBuilder<TSubject, ISingularSpecification<TSubject>> specificationBuilder, Negated negated)
        {
            return new NegatableSingularIs<TSubject>(specificationBuilder, negated);
        }
    }
}
